package cn.iocoder.yudao.module.crossborder.platform.controller.admin.platformapiconfig.vo;

import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

@Schema(description = "管理后台 - 跨境电商平台API配置 Response VO")
@Data
@ExcelIgnoreUnannotated
public class PlatformApiConfigRespVO {

    @Schema(description = "API配置编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "30948")
    @ExcelProperty("API配置编号")
    private Long id;

    @Schema(description = "平台编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "11830")
    @ExcelProperty("平台编号")
    private Long platformId;

    @Schema(description = "店铺编号（为空表示平台级配置）", example = "28941")
    @ExcelProperty("店铺编号（为空表示平台级配置）")
    private Long storeId;

    @Schema(description = "API类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelProperty("API类型")
    private String apiType;

    @Schema(description = "API名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
    @ExcelProperty("API名称")
    private String apiName;

    @Schema(description = "API端点", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("API端点")
    private String apiEndpoint;

    @Schema(description = "HTTP方法", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("HTTP方法")
    private String httpMethod;

    @Schema(description = "请求头配置JSON")
    @ExcelProperty("请求头配置JSON")
    private String requestHeaders;

    @Schema(description = "请求参数配置JSON")
    @ExcelProperty("请求参数配置JSON")
    private String requestParams;

    @Schema(description = "响应映射配置JSON")
    @ExcelProperty("响应映射配置JSON")
    private String responseMapping;

    @Schema(description = "每分钟请求限制")
    @ExcelProperty("每分钟请求限制")
    private Integer rateLimitPerMinute;

    @Schema(description = "每小时请求限制")
    @ExcelProperty("每小时请求限制")
    private Integer rateLimitPerHour;

    @Schema(description = "每天请求限制")
    @ExcelProperty("每天请求限制")
    private Integer rateLimitPerDay;

    @Schema(description = "超时时间（秒）", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("超时时间（秒）")
    private Integer timeoutSeconds;

    @Schema(description = "重试次数", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("重试次数")
    private Integer retryTimes;

    @Schema(description = "重试间隔（秒）", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("重试间隔（秒）")
    private Integer retryIntervalSeconds;

    @Schema(description = "状态（0正常 1停用）", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelProperty("状态（0正常 1停用）")
    private Integer status;

    @Schema(description = "是否启用", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("是否启用")
    private Boolean enabled;

    @Schema(description = "备注", example = "你说的对")
    @ExcelProperty("备注")
    private String remark;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}
